<?php

define('BASE_DIR', '../../');

require_once('../../vendor/Zend/Registry.php');

Zend_Registry::set('DISABLE_ACL', true);
Zend_Registry::set('DISABLE_MODULE_LOADER', true);
Zend_Registry::set('DISABLE_SITE_SWITCHER', true);

require_once(BASE_DIR . 'lib/bootstrap.php');

set_include_path(BASE_DIR . 'db/migrations' . PATH_SEPARATOR . get_include_path());

$manager = Doctrine_Manager::getInstance();

// $manager->setAttribute(Doctrine_Core::ATTR_MODEL_CLASS_PREFIX, 'FP_Dao_');
//
// Doctrine::generateMigrationsFromModels(BASE_DIR . 'db/migrations', BASE_DIR . 'lib/FP/Dao', Doctrine_Core::MODEL_LOADING_CONSERVATIVE);

$manager->setAttribute(Doctrine_Core::ATTR_MODEL_CLASS_PREFIX, FP_Application::getNamespace() . '_Dao_');

Doctrine::generateMigrationsFromModels(BASE_DIR . 'db/migrations', BASE_DIR . 'lib/' . FP_Application::getNamespace() . '/Dao', Doctrine_Core::MODEL_LOADING_CONSERVATIVE);

echo 'Finished';

?>